Skip to content

feat(companion): same-account zero-click connect, sign-out revocation, and pairing beacon - #80

Merged
DimoADE merged 1 commit into
DimoADE:masterfrom
DorJay007:feat/companion-seamless-connect-and-ota
Nov 19, 2026
Merged

DimoADE merged 1 commit into
DimoADE:masterfrom
DorJay007:feat/companion-seamless-connect-and-ota

Conversation

@DorJay007

@DorJay007 DorJay007 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Rebased cleanly onto DimoADE/Dimo:master (v0.5.1) and resolved all CI, schema, merge-conflict, and security issues from the earlier branch:

sequenceDiagram
    participant Mobile
    participant Host as Dimo Host (crates/server)
    participant Site as Dimo Account API
    Mobile->>Host: POST /api/v1/auth/connect-requests (account_token)
    Host->>Site: verify device_token + live host_token (match immutable user.id)
    alt Same account & auto-connect enabled
        Host-->>Mobile: 201 Approved + DeviceCredential + 4-digit SAS code
        Host->>Host: Surface non-blocking SAS banner with one-click 断开
    else Sign out on Desktop
        Host->>Host: revoke_account_linked_devices (disconnect LAN & relay)
    end
Loading

Key fixes in this rebase:

  • Submodule & CI checkout: Removed the fork-only submodule gitlink bump (mobile/ios / mobile/android) so CI checkout succeeds cleanly.
  • SQLx migration timestamps: Renamed connect-request migrations to 20261118000000_connect_request_account.sql and 20261118010000_connect_request_auto_approval.sql to avoid colliding with upstream 20261115010000_conversation_steering_delivery.sql.
  • Same-account auth hardening (crates/server/src/account_link.rs): Always requires and live-verifies host_token (rejecting stale cached __account_owner_v1 records) and compares immutable user.id first before falling back to case-insensitive username.
  • Upstream security & UI preservation: Preserved 7850c0a06 unauthenticated connect-request protection, public_key_ed25519 projection in list_connect_requests, Ed25519 auto-approve guard, and offline idle reminder snooze cooldown in MobileDeviceConnectBanner.tsx.
  • Arch ratchet [I2] & contracts: Dropped out-of-scope crates/conversations SQL changes; regenerated shared/hostCommands.ts and verified shared/types.ts + docs/protocol/v1/*.json are in sync.

Evidence

  • Before: PR feat(companion): same-account zero-click connect, sign-out revocation, and pairing beacon #80 was CONFLICTING, failed 12/12 CI jobs on submodule checkout, had a duplicate migration timestamp 20261115010000, and trusted cached owner username without live host_token verification.
  • After:
    • node scripts/run-generate-types.js --check — shared/types.ts & shared/hostCommands.ts up to date
    • node scripts/remote-protocol-schema.js --check — verified remote protocol v1 artifacts
    • node scripts/check-arch-invariants.mjs — 0 violations across [I1]–[I5]
    • pnpm --filter ./frontend exec tsc --noEmit & eslint --max-warnings 0 — passed
    • pnpm --filter ./frontend exec vitest run src/components/layout/MobileDeviceConnectBanner.test.tsx — 11/11 passed
    • SQLX_OFFLINE=true cargo clippy -p remote-protocol -p db -p application -p server -p dimo --no-deps --all-targets -- -D warnings — 0 warnings
    • cargo test -p server --lib account_link — 6/6 passed
    • cargo test -p server --lib host_console_pairing_tests — 8/8 passed
    • cargo test -p server --test webrtc_security_and_session — 5/5 passed

Merge Danger

Door: two-way (additive ALTER TABLE columns and opt-out same-account auto-connect; reversible without data loss).

Blast Radius: Low — scoped to device pairing/connect-request auth, host-sign-out revocation, pairing-code beacon publishing, and the desktop connect banner.

@DorJay007 DorJay007 changed the title feat(remote,companion): 同账号零点击 SAS 直连、远程连接容错与设备撤销闭环、移动端在线更新 feat(remote,companion): 同账号零点击 SAS 直连、远程连接容错与设备撤销闭环、移动端 v0.4.7 更新 Nov 15, 2026
@DorJay007
DorJay007 force-pushed the feat/companion-seamless-connect-and-ota branch from 38bb62a to f55f1eb Compare November 19, 2026 11:14
@DorJay007 DorJay007 changed the title feat(remote,companion): 同账号零点击 SAS 直连、远程连接容错与设备撤销闭环、移动端 v0.4.7 更新 feat(companion): same-account zero-click connect, sign-out revocation, and pairing beacon Nov 19, 2026
@DimoADE
DimoADE force-pushed the feat/companion-seamless-connect-and-ota branch from f55f1eb to 26a633b Compare November 19, 2026 11:59
@DimoADE
DimoADE merged commit 45be9a2 into DimoADE:master Nov 19, 2026
30 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants